package com.buddies.lottery.data.repo;

import com.buddies.lottery.data.HandleResultHelper;
import com.buddies.lottery.data.RetrofitManager;
import com.buddies.lottery.data.api.IMApi;
import com.buddies.lottery.data.resp.IMTokenResponse;

import io.reactivex.Observable;

/**
 * Description:
 * Date: 2018/2/24
 * Author: xuliang
 */
public class IMRepo {

    private IMApi mIMApi;

    public IMRepo() {
        mIMApi = RetrofitManager.getInstance().create(IMApi.class);
    }

    public Observable<IMTokenResponse> getIMToken(long uid, String imToken) {
        return mIMApi.getIMToken(uid, imToken).compose(HandleResultHelper.<IMTokenResponse>handleResult());
    }

}
